#include<iostream>
#include<vector>
#include<string.h>
using namespace std;
void beibao(vector<int>nums,int sum[],int n)
{
	int cout1;
	for(int i=0;i<n;i++)
	{
		if(sum[cout]+nums[i]<=6000)sum[cout]+=nums[i];
		else
		{
			cout1++;
			sum[cout]+=nums[i];
		}
		cout<<i<<" "<<cout1<<endl;;
	}
}
int main()
{
	int<vector>f;
	int x;
	while(x)f.push_back(x);
	int n=f.size();
	int a[n];
	memset(a,0,sizeof(a));
	beibao(f,a,n);
	
}
